package com.javalong.affairs.module.task.activity;

import android.os.Bundle;

import com.javalong.affairs.R;
import com.javalong.affairs.base.activity.UIHandlerActivity;
import com.javalong.affairs.base.manager.IntentManager;
import com.javalong.affairs.base.ui.TopTitle;
import com.javalong.affairs.base.ui.TopTitle.OnRightDrawableClick;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ContentView;
import com.lidroid.xutils.view.annotation.ViewInject;

@ContentView(R.layout.activity_tasklist)
public class TaskListActivity extends UIHandlerActivity {
    @ViewInject(R.id.ui_toptitle)
    private TopTitle topTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ViewUtils.inject(this);
        initUI();
    }

    private void initUI() {
        topTitle.setOnRightDrawableClick(new OnRightDrawableClick() {
            @Override
            public void rightClick() {
                IntentManager.doActivity(TaskListActivity.this,
                        TaskTrackActivity.class);
            }
        });
        topTitle.setOnLeftDrawableClick(this);
    }
}
